package cn.dnui_xcz826.dnuifood_16110100826.service;


import cn.dnui_xcz826.dnuifood_16110100826.bean.ResultBean;
import cn.dnui_xcz826.dnuifood_16110100826.bean.UpLoadBean;
import cn.dnui_xcz826.dnuifood_16110100826.bean.UserBean;
import okhttp3.MultipartBody;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

/**
 * Created by neusoft on 2018/10/15.
 */

public interface UserService {
    @GET("userLogin.do")
    Call<UserBean> doLogin(
            @Query("username") String username,
            @Query("userpass") String password);
    @GET("userRegister.do")
    Call<ResultBean> doRegister(
            @Query("username") String username,
            @Query("userpass") String password,
            @Query("mobilenum") String mobilenum,
            @Query("address") String address,
            @Query("comment") String comment
    );
    @GET("getUserById.do")
    Call<UserBean> doGetUserById(
            @Query("user_id") String user_id
    );

    @GET("updateUserById.do")
    Call<ResultBean> doUpdateUserById(
            @Query("user_id") String user_id,
            @Query("username") String username,
            @Query("userpass") String userpass,
            @Query("mobilenum") String mobilenum,
            @Query("address") String address
    );

    @POST("updateAvatar.do")
    Call<UpLoadBean> doUploadAvatar(@Body MultipartBody avatar);
}
